<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Oboe: include/oboe/AudioStream.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Oboe
   &#160;<span id="projectnumber">1.2</span>
   </div>
   <div id="projectbrief">A library for creating real-time audio apps on Android</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_768f6301d9838e45d679001914ab2803.html">oboe</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">AudioStream.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright 2016 The Android Open Source Project</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * You may obtain a copy of the License at</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *      http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * limitations under the License.</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#ifndef OBOE_STREAM_H_</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#define OBOE_STREAM_H_</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &lt;atomic&gt;</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#include &lt;cstdint&gt;</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#include &lt;ctime&gt;</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#include &lt;mutex&gt;</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#include &quot;oboe/Definitions.h&quot;</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &quot;oboe/ResultWithValue.h&quot;</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &quot;oboe/AudioStreamBuilder.h&quot;</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &quot;oboe/AudioStreamBase.h&quot;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="namespaceoboe.html">   31</a></span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceoboe.html">oboe</a> {</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="namespaceoboe.html#aab8f5f081a8b2147e16ec920347c1b5c">   39</a></span>&#160;constexpr int64_t <a class="code" href="namespaceoboe.html#aab8f5f081a8b2147e16ec920347c1b5c">kDefaultTimeoutNanos</a> = (2000 * <a class="code" href="namespaceoboe.html#a831e887150474c087170679eaca8672b">kNanosPerMillisecond</a>);</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classoboe_1_1_audio_stream.html">   44</a></span>&#160;<span class="keyword">class </span><a class="code" href="classoboe_1_1_audio_stream.html">AudioStream</a> : <span class="keyword">public</span> <a class="code" href="classoboe_1_1_audio_stream_base.html">AudioStreamBase</a> {</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <a class="code" href="classoboe_1_1_audio_stream.html">AudioStream</a>() {}</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keyword">explicit</span> <a class="code" href="classoboe_1_1_audio_stream.html">AudioStream</a>(<span class="keyword">const</span> <a class="code" href="classoboe_1_1_audio_stream_builder.html">AudioStreamBuilder</a> &amp;builder);</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="classoboe_1_1_audio_stream.html">AudioStream</a>() = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="classoboe_1_1_audio_stream.html#a686c6ce8a29051c858fd1de386805dc6">   66</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> <a class="code" href="classoboe_1_1_audio_stream.html#a686c6ce8a29051c858fd1de386805dc6">open</a>() {</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        <span class="keywordflow">return</span> Result::OK; <span class="comment">// Called by subclasses. Might do more in the future.</span></div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    }</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> <a class="code" href="classoboe_1_1_audio_stream.html#a9c8ea30e30e513766d5e996c370eb8d8">close</a>();</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> <a class="code" href="classoboe_1_1_audio_stream.html#af04f03eb6b64b564f1c4401688987d21">start</a>(int64_t timeoutNanoseconds = <a class="code" href="namespaceoboe.html#aab8f5f081a8b2147e16ec920347c1b5c">kDefaultTimeoutNanos</a>);</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> <a class="code" href="classoboe_1_1_audio_stream.html#a04f29836748a8e5842aef2be200022ad">pause</a>(int64_t timeoutNanoseconds = <a class="code" href="namespaceoboe.html#aab8f5f081a8b2147e16ec920347c1b5c">kDefaultTimeoutNanos</a>);</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> <a class="code" href="classoboe_1_1_audio_stream.html#a32c25c0333eab3d65ce02275ad4acb3d">flush</a>(int64_t timeoutNanoseconds = <a class="code" href="namespaceoboe.html#aab8f5f081a8b2147e16ec920347c1b5c">kDefaultTimeoutNanos</a>);</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> <a class="code" href="classoboe_1_1_audio_stream.html#aec093859d42f0470c884edd1e976d9f3">stop</a>(int64_t timeoutNanoseconds = <a class="code" href="namespaceoboe.html#aab8f5f081a8b2147e16ec920347c1b5c">kDefaultTimeoutNanos</a>);</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    <span class="comment">/* Asynchronous requests.</span></div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;<span class="comment">     * Use waitForStateChange() if you need to wait for completion.</span></div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;<span class="comment">     */</span></div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> <a class="code" href="classoboe_1_1_audio_stream.html#a3c484e314dee8dfed1d419f487b5d601">requestStart</a>() = 0;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> <a class="code" href="classoboe_1_1_audio_stream.html#a7f18bb3cc5490fd7fbc1f6da63c730f6">requestPause</a>() = 0;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> <a class="code" href="classoboe_1_1_audio_stream.html#a6bd5d633ff999e4da1faf3cd949aa602">requestFlush</a>() = 0;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> <a class="code" href="classoboe_1_1_audio_stream.html#a820e634f741e6b5efdcef8104cecb919">requestStop</a>() = 0;</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="namespaceoboe.html#a89fa2ce046723764618c29db737917f6">StreamState</a> <a class="code" href="classoboe_1_1_audio_stream.html#a9d37cc6513823c685ae892626ff83ea8">getState</a>() <span class="keyword">const</span> = 0;</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> <a class="code" href="classoboe_1_1_audio_stream.html#a0c865a5501f369d959c39d8ab8b46a07">waitForStateChange</a>(<a class="code" href="namespaceoboe.html#a89fa2ce046723764618c29db737917f6">StreamState</a> inputState,</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;                                          <a class="code" href="namespaceoboe.html#a89fa2ce046723764618c29db737917f6">StreamState</a> *nextState,</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;                                          int64_t timeoutNanoseconds) = 0;</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;</div><div class="line"><a name="l00177"></a><span class="lineno"><a class="line" href="classoboe_1_1_audio_stream.html#a06e3f9e133b3a75515e7793939d1cd03">  177</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classoboe_1_1_result_with_value.html">ResultWithValue&lt;int32_t&gt;</a> <a class="code" href="classoboe_1_1_audio_stream.html#a06e3f9e133b3a75515e7793939d1cd03">setBufferSizeInFrames</a>(int32_t <span class="comment">/* requestedFrames  */</span>) {</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;        <span class="keywordflow">return</span> Result::ErrorUnimplemented;</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    }</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;</div><div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="classoboe_1_1_audio_stream.html#ad1a1d3bbf3b348ed92b7ed18ce9cc261">  193</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classoboe_1_1_result_with_value.html">ResultWithValue&lt;int32_t&gt;</a> <a class="code" href="classoboe_1_1_audio_stream.html#ad1a1d3bbf3b348ed92b7ed18ce9cc261">getXRunCount</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classoboe_1_1_result_with_value.html">ResultWithValue&lt;int32_t&gt;</a>(Result::ErrorUnimplemented);</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;    }</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classoboe_1_1_audio_stream.html#a43d8a098440cde28f4ee8bedd6d107c4">isXRunCountSupported</a>() <span class="keyword">const</span> = 0;</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;    <span class="keyword">virtual</span> int32_t <a class="code" href="classoboe_1_1_audio_stream.html#ac160acb656515814fa6fdd157c131a0a">getFramesPerBurst</a>() = 0;</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;</div><div class="line"><a name="l00216"></a><span class="lineno"><a class="line" href="classoboe_1_1_audio_stream.html#a5c01907a59d5f89a5e4b819fe66b08bc">  216</a></span>&#160;    int32_t <a class="code" href="classoboe_1_1_audio_stream.html#a5c01907a59d5f89a5e4b819fe66b08bc">getBytesPerFrame</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classoboe_1_1_audio_stream_base.html#a5ff460bac9d14dfeac4eeddfcbb6e206">mChannelCount</a> * <a class="code" href="classoboe_1_1_audio_stream.html#a44dda61e6e948e49b68f87172f084d62">getBytesPerSample</a>(); }</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;    int32_t <a class="code" href="classoboe_1_1_audio_stream.html#a44dda61e6e948e49b68f87172f084d62">getBytesPerSample</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;    <span class="keyword">virtual</span> int64_t <a class="code" href="classoboe_1_1_audio_stream.html#ab43dd4074e1de57bac1c3fd111430341">getFramesWritten</a>();</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;    <span class="keyword">virtual</span> int64_t <a class="code" href="classoboe_1_1_audio_stream.html#aeebfc59abd978cd6dff07c16cfe266df">getFramesRead</a>();</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;</div><div class="line"><a name="l00265"></a><span class="lineno"><a class="line" href="classoboe_1_1_audio_stream.html#ae023cb001f3261d064f423101798d6be">  265</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classoboe_1_1_result_with_value.html">ResultWithValue&lt;double&gt;</a> <a class="code" href="classoboe_1_1_audio_stream.html#ae023cb001f3261d064f423101798d6be">calculateLatencyMillis</a>() {</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classoboe_1_1_result_with_value.html">ResultWithValue&lt;double&gt;</a>(Result::ErrorUnimplemented);</div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;    }</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;</div><div class="line"><a name="l00286"></a><span class="lineno"><a class="line" href="classoboe_1_1_audio_stream.html#acb8edbc17ff79993a8ed996d216fe6f3">  286</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> <a class="code" href="classoboe_1_1_audio_stream.html#acb8edbc17ff79993a8ed996d216fe6f3">getTimestamp</a>(clockid_t <span class="comment">/* clockId  */</span>,</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;                                int64_t* <span class="comment">/* framePosition */</span>,</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;                                int64_t* <span class="comment">/* timeNanoseconds */</span>) {</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;        <span class="keywordflow">return</span> Result::ErrorUnimplemented;</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;    }</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;</div><div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classoboe_1_1_result_with_value.html">ResultWithValue&lt;FrameTimestamp&gt;</a> <a class="code" href="classoboe_1_1_audio_stream.html#acb8edbc17ff79993a8ed996d216fe6f3">getTimestamp</a>(clockid_t <span class="comment">/* clockId */</span>);</div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;</div><div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;    <span class="comment">// ============== I/O ===========================</span></div><div class="line"><a name="l00322"></a><span class="lineno"><a class="line" href="classoboe_1_1_audio_stream.html#a3612c05ed6b01a213dde67d913c07e11">  322</a></span>&#160;<span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classoboe_1_1_result_with_value.html">ResultWithValue&lt;int32_t&gt;</a> <a class="code" href="classoboe_1_1_audio_stream.html#a3612c05ed6b01a213dde67d913c07e11">write</a>(<span class="keyword">const</span> <span class="keywordtype">void</span>* <span class="comment">/* buffer */</span>,</div><div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;                             int32_t <span class="comment">/* numFrames */</span>,</div><div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;                             int64_t <span class="comment">/* timeoutNanoseconds */</span> ) {</div><div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classoboe_1_1_result_with_value.html">ResultWithValue&lt;int32_t&gt;</a>(Result::ErrorUnimplemented);</div><div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;    }</div><div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;</div><div class="line"><a name="l00340"></a><span class="lineno"><a class="line" href="classoboe_1_1_audio_stream.html#a8089f0a0cb68d4039cf33e6584129978">  340</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classoboe_1_1_result_with_value.html">ResultWithValue&lt;int32_t&gt;</a> <a class="code" href="classoboe_1_1_audio_stream.html#a8089f0a0cb68d4039cf33e6584129978">read</a>(<span class="keywordtype">void</span>* <span class="comment">/* buffer */</span>,</div><div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;                            int32_t <span class="comment">/* numFrames */</span>,</div><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;                            int64_t <span class="comment">/* timeoutNanoseconds */</span>) {</div><div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classoboe_1_1_result_with_value.html">ResultWithValue&lt;int32_t&gt;</a>(Result::ErrorUnimplemented);</div><div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;    }</div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;</div><div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="namespaceoboe.html#a92972414867c81d5974cb2ed7abefbf6">AudioApi</a> <a class="code" href="classoboe_1_1_audio_stream.html#a2b7a3cee7444114843dbdd1fc705f6bb">getAudioApi</a>() <span class="keyword">const</span> = 0;</div><div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;</div><div class="line"><a name="l00358"></a><span class="lineno"><a class="line" href="classoboe_1_1_audio_stream.html#a15cdaaaa4c1e8da322d6da33334c8147">  358</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classoboe_1_1_audio_stream.html#a15cdaaaa4c1e8da322d6da33334c8147">usesAAudio</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classoboe_1_1_audio_stream.html#a2b7a3cee7444114843dbdd1fc705f6bb">getAudioApi</a>() == <a class="code" href="namespaceoboe.html#a92972414867c81d5974cb2ed7abefbf6a99780b1e8d754eb42abed0ca5253e55b">AudioApi::AAudio</a>;</div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;    }</div><div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;</div><div class="line"><a name="l00370"></a><span class="lineno"><a class="line" href="classoboe_1_1_audio_stream.html#a5458d7130415eb4defe3dbc11d479e2f">  370</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> *<a class="code" href="classoboe_1_1_audio_stream.html#a5458d7130415eb4defe3dbc11d479e2f">getUnderlyingStream</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;    }</div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;</div><div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classoboe_1_1_audio_stream.html#aa5f4801cca6877eeaa4735b93933269d">launchStopThread</a>();</div><div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;</div><div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classoboe_1_1_audio_stream.html#a64ad978c5f70ced17ef5a96605496515">updateFramesWritten</a>() = 0;</div><div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;</div><div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classoboe_1_1_audio_stream.html#a462358ddab709c79d1a7968d6d55b727">updateFramesRead</a>() = 0;</div><div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;</div><div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;    <span class="comment">/*</span></div><div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;<span class="comment">     * Swap old callback for new callback.</span></div><div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;<span class="comment">     * This not atomic.</span></div><div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;<span class="comment">     * This should only be used internally.</span></div><div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;<span class="comment">     * @param streamCallback</span></div><div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;<span class="comment">     * @return previous streamCallback</span></div><div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;<span class="comment">     */</span></div><div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;    <a class="code" href="classoboe_1_1_audio_stream_callback.html">AudioStreamCallback</a> *swapCallback(<a class="code" href="classoboe_1_1_audio_stream_callback.html">AudioStreamCallback</a> *streamCallback) {</div><div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;        <a class="code" href="classoboe_1_1_audio_stream_callback.html">AudioStreamCallback</a> *previousCallback = <a class="code" href="classoboe_1_1_audio_stream_base.html#ae3f72318212dd9977d7fa0ced92c91f4">mStreamCallback</a>;</div><div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;        <a class="code" href="classoboe_1_1_audio_stream_base.html#ae3f72318212dd9977d7fa0ced92c91f4">mStreamCallback</a> = streamCallback;</div><div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;        <span class="keywordflow">return</span> previousCallback;</div><div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;    }</div><div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;</div><div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;    ResultWithValue&lt;int32_t&gt; <a class="code" href="classoboe_1_1_audio_stream.html#afa35ee4b8629fbffe26b9be7c7ed55d2">getAvailableFrames</a>();</div><div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;</div><div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;    ResultWithValue&lt;int32_t&gt; <a class="code" href="classoboe_1_1_audio_stream.html#afddb0962863ccf9ec6672a042fe15941">waitForAvailableFrames</a>(int32_t numFrames,</div><div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;                                                    int64_t timeoutNanoseconds);</div><div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;</div><div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;</div><div class="line"><a name="l00432"></a><span class="lineno"><a class="line" href="classoboe_1_1_audio_stream.html#aa48da7bf28026b7cccee73e6b054af28">  432</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classoboe_1_1_audio_stream.html#aa48da7bf28026b7cccee73e6b054af28">wasErrorCallbackCalled</a>() {</div><div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;        <span class="keywordflow">return</span> mErrorCallbackCalled.exchange(<span class="keyword">true</span>);</div><div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;    }</div><div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;</div><div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> <a class="code" href="classoboe_1_1_audio_stream.html#a8adbacd6a55a94a532916ab037fba1d6">waitForStateTransition</a>(<a class="code" href="namespaceoboe.html#a89fa2ce046723764618c29db737917f6">StreamState</a> startingState,</div><div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;                                          <a class="code" href="namespaceoboe.html#a89fa2ce046723764618c29db737917f6">StreamState</a> endingState,</div><div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;                                          int64_t timeoutNanoseconds);</div><div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;</div><div class="line"><a name="l00453"></a><span class="lineno"><a class="line" href="classoboe_1_1_audio_stream.html#a0ea79e60f5a3d29fc5a1a116aba11dfe">  453</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="namespaceoboe.html#af85fc9910a287df6c5df0ed396bb75cd">DataCallbackResult</a> <a class="code" href="classoboe_1_1_audio_stream.html#a0ea79e60f5a3d29fc5a1a116aba11dfe">onDefaultCallback</a>(<span class="keywordtype">void</span>* <span class="comment">/* audioData  */</span>, <span class="keywordtype">int</span> <span class="comment">/* numFrames */</span>) {</div><div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;        <span class="keywordflow">return</span> DataCallbackResult::Stop;</div><div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;    }</div><div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;</div><div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;    <a class="code" href="namespaceoboe.html#af85fc9910a287df6c5df0ed396bb75cd">DataCallbackResult</a> <a class="code" href="classoboe_1_1_audio_stream.html#ab7a8cfe5d6039386bc5850fd5ee9bd62">fireDataCallback</a>(<span class="keywordtype">void</span> *audioData, <span class="keywordtype">int</span> numFrames);</div><div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;</div><div class="line"><a name="l00470"></a><span class="lineno"><a class="line" href="classoboe_1_1_audio_stream.html#add85011ba825f74931deeb92c5edf831">  470</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classoboe_1_1_audio_stream.html#add85011ba825f74931deeb92c5edf831">isDataCallbackEnabled</a>() {</div><div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;        <span class="keywordflow">return</span> mDataCallbackEnabled;</div><div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;    }</div><div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;</div><div class="line"><a name="l00478"></a><span class="lineno"><a class="line" href="classoboe_1_1_audio_stream.html#a0faa6d3a6fd4f367e6f80d5a29e6dcba">  478</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classoboe_1_1_audio_stream.html#a0faa6d3a6fd4f367e6f80d5a29e6dcba">setDataCallbackEnabled</a>(<span class="keywordtype">bool</span> enabled) {</div><div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;        mDataCallbackEnabled = enabled;</div><div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;    }</div><div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;</div><div class="line"><a name="l00488"></a><span class="lineno"><a class="line" href="classoboe_1_1_audio_stream.html#a88a63317b7c58815bac074976b00aa23">  488</a></span>&#160;    std::atomic&lt;int64_t&gt; <a class="code" href="classoboe_1_1_audio_stream.html#a88a63317b7c58815bac074976b00aa23">mFramesWritten</a>{};</div><div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;</div><div class="line"><a name="l00496"></a><span class="lineno"><a class="line" href="classoboe_1_1_audio_stream.html#a07e82f9b9e2e4800f23ae9a7193c3b58">  496</a></span>&#160;    std::atomic&lt;int64_t&gt; <a class="code" href="classoboe_1_1_audio_stream.html#a07e82f9b9e2e4800f23ae9a7193c3b58">mFramesRead</a>{};</div><div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;</div><div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;    std::mutex           mLock; <span class="comment">// for synchronizing start/stop/close</span></div><div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;</div><div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;    <span class="keywordtype">int</span>                  mPreviousScheduler = -1;</div><div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;</div><div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;    std::atomic&lt;bool&gt;    mDataCallbackEnabled{<span class="keyword">false</span>};</div><div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;    std::atomic&lt;bool&gt;    mErrorCallbackCalled{<span class="keyword">false</span>};</div><div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;</div><div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;</div><div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;};</div><div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160;</div><div class="line"><a name="l00513"></a><span class="lineno"><a class="line" href="structoboe_1_1_stream_deleter_functor.html">  513</a></span>&#160;    <span class="keyword">struct </span><a class="code" href="structoboe_1_1_stream_deleter_functor.html">StreamDeleterFunctor</a> {</div><div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;        <span class="keywordtype">void</span> operator()(<a class="code" href="classoboe_1_1_audio_stream.html">AudioStream</a>  *audioStream) {</div><div class="line"><a name="l00515"></a><span class="lineno">  515</span>&#160;            <span class="keywordflow">if</span> (audioStream) {</div><div class="line"><a name="l00516"></a><span class="lineno">  516</span>&#160;                audioStream-&gt;<a class="code" href="classoboe_1_1_audio_stream.html#a9c8ea30e30e513766d5e996c370eb8d8">close</a>();</div><div class="line"><a name="l00517"></a><span class="lineno">  517</span>&#160;            }</div><div class="line"><a name="l00518"></a><span class="lineno">  518</span>&#160;            <span class="keyword">delete</span> audioStream;</div><div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;        }</div><div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;    };</div><div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160;} <span class="comment">// namespace oboe</span></div><div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;</div><div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* OBOE_STREAM_H_ */</span><span class="preprocessor"></span></div><div class="ttc" id="classoboe_1_1_audio_stream_html_a0ea79e60f5a3d29fc5a1a116aba11dfe"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a0ea79e60f5a3d29fc5a1a116aba11dfe">oboe::AudioStream::onDefaultCallback</a></div><div class="ttdeci">virtual DataCallbackResult onDefaultCallback(void *, int)</div><div class="ttdef"><b>Definition:</b> AudioStream.h:453</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_aec093859d42f0470c884edd1e976d9f3"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#aec093859d42f0470c884edd1e976d9f3">oboe::AudioStream::stop</a></div><div class="ttdeci">virtual Result stop(int64_t timeoutNanoseconds=kDefaultTimeoutNanos)</div></div>
<div class="ttc" id="namespaceoboe_html_a92972414867c81d5974cb2ed7abefbf6a99780b1e8d754eb42abed0ca5253e55b"><div class="ttname"><a href="namespaceoboe.html#a92972414867c81d5974cb2ed7abefbf6a99780b1e8d754eb42abed0ca5253e55b">oboe::AudioApi::AAudio</a></div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_builder_html"><div class="ttname"><a href="classoboe_1_1_audio_stream_builder.html">oboe::AudioStreamBuilder</a></div><div class="ttdef"><b>Definition:</b> AudioStreamBuilder.h:31</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_afa35ee4b8629fbffe26b9be7c7ed55d2"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#afa35ee4b8629fbffe26b9be7c7ed55d2">oboe::AudioStream::getAvailableFrames</a></div><div class="ttdeci">ResultWithValue&lt; int32_t &gt; getAvailableFrames()</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a0faa6d3a6fd4f367e6f80d5a29e6dcba"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a0faa6d3a6fd4f367e6f80d5a29e6dcba">oboe::AudioStream::setDataCallbackEnabled</a></div><div class="ttdeci">void setDataCallbackEnabled(bool enabled)</div><div class="ttdef"><b>Definition:</b> AudioStream.h:478</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a15cdaaaa4c1e8da322d6da33334c8147"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a15cdaaaa4c1e8da322d6da33334c8147">oboe::AudioStream::usesAAudio</a></div><div class="ttdeci">bool usesAAudio() const</div><div class="ttdef"><b>Definition:</b> AudioStream.h:358</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a32c25c0333eab3d65ce02275ad4acb3d"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a32c25c0333eab3d65ce02275ad4acb3d">oboe::AudioStream::flush</a></div><div class="ttdeci">virtual Result flush(int64_t timeoutNanoseconds=kDefaultTimeoutNanos)</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a5c01907a59d5f89a5e4b819fe66b08bc"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a5c01907a59d5f89a5e4b819fe66b08bc">oboe::AudioStream::getBytesPerFrame</a></div><div class="ttdeci">int32_t getBytesPerFrame() const</div><div class="ttdef"><b>Definition:</b> AudioStream.h:216</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_af04f03eb6b64b564f1c4401688987d21"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#af04f03eb6b64b564f1c4401688987d21">oboe::AudioStream::start</a></div><div class="ttdeci">virtual Result start(int64_t timeoutNanoseconds=kDefaultTimeoutNanos)</div></div>
<div class="ttc" id="namespaceoboe_html_aab8f5f081a8b2147e16ec920347c1b5c"><div class="ttname"><a href="namespaceoboe.html#aab8f5f081a8b2147e16ec920347c1b5c">oboe::kDefaultTimeoutNanos</a></div><div class="ttdeci">constexpr int64_t kDefaultTimeoutNanos</div><div class="ttdef"><b>Definition:</b> AudioStream.h:39</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_ad1a1d3bbf3b348ed92b7ed18ce9cc261"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#ad1a1d3bbf3b348ed92b7ed18ce9cc261">oboe::AudioStream::getXRunCount</a></div><div class="ttdeci">virtual ResultWithValue&lt; int32_t &gt; getXRunCount() const</div><div class="ttdef"><b>Definition:</b> AudioStream.h:193</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a88a63317b7c58815bac074976b00aa23"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a88a63317b7c58815bac074976b00aa23">oboe::AudioStream::mFramesWritten</a></div><div class="ttdeci">std::atomic&lt; int64_t &gt; mFramesWritten</div><div class="ttdef"><b>Definition:</b> AudioStream.h:488</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_ab7a8cfe5d6039386bc5850fd5ee9bd62"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#ab7a8cfe5d6039386bc5850fd5ee9bd62">oboe::AudioStream::fireDataCallback</a></div><div class="ttdeci">DataCallbackResult fireDataCallback(void *audioData, int numFrames)</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a5458d7130415eb4defe3dbc11d479e2f"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a5458d7130415eb4defe3dbc11d479e2f">oboe::AudioStream::getUnderlyingStream</a></div><div class="ttdeci">virtual void * getUnderlyingStream() const</div><div class="ttdef"><b>Definition:</b> AudioStream.h:370</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a64ad978c5f70ced17ef5a96605496515"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a64ad978c5f70ced17ef5a96605496515">oboe::AudioStream::updateFramesWritten</a></div><div class="ttdeci">virtual void updateFramesWritten()=0</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_ab43dd4074e1de57bac1c3fd111430341"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#ab43dd4074e1de57bac1c3fd111430341">oboe::AudioStream::getFramesWritten</a></div><div class="ttdeci">virtual int64_t getFramesWritten()</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_afddb0962863ccf9ec6672a042fe15941"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#afddb0962863ccf9ec6672a042fe15941">oboe::AudioStream::waitForAvailableFrames</a></div><div class="ttdeci">ResultWithValue&lt; int32_t &gt; waitForAvailableFrames(int32_t numFrames, int64_t timeoutNanoseconds)</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_callback_html"><div class="ttname"><a href="classoboe_1_1_audio_stream_callback.html">oboe::AudioStreamCallback</a></div><div class="ttdef"><b>Definition:</b> AudioStreamCallback.h:33</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_base_html_a5ff460bac9d14dfeac4eeddfcbb6e206"><div class="ttname"><a href="classoboe_1_1_audio_stream_base.html#a5ff460bac9d14dfeac4eeddfcbb6e206">oboe::AudioStreamBase::mChannelCount</a></div><div class="ttdeci">int32_t mChannelCount</div><div class="ttdef"><b>Definition:</b> AudioStreamBase.h:156</div></div>
<div class="ttc" id="namespaceoboe_html_af85fc9910a287df6c5df0ed396bb75cd"><div class="ttname"><a href="namespaceoboe.html#af85fc9910a287df6c5df0ed396bb75cd">oboe::DataCallbackResult</a></div><div class="ttdeci">DataCallbackResult</div><div class="ttdef"><b>Definition:</b> Definitions.h:119</div></div>
<div class="ttc" id="namespaceoboe_html_a92972414867c81d5974cb2ed7abefbf6"><div class="ttname"><a href="namespaceoboe.html#a92972414867c81d5974cb2ed7abefbf6">oboe::AudioApi</a></div><div class="ttdeci">AudioApi</div><div class="ttdef"><b>Definition:</b> Definitions.h:213</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a8adbacd6a55a94a532916ab037fba1d6"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a8adbacd6a55a94a532916ab037fba1d6">oboe::AudioStream::waitForStateTransition</a></div><div class="ttdeci">virtual Result waitForStateTransition(StreamState startingState, StreamState endingState, int64_t timeoutNanoseconds)</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_ac160acb656515814fa6fdd157c131a0a"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#ac160acb656515814fa6fdd157c131a0a">oboe::AudioStream::getFramesPerBurst</a></div><div class="ttdeci">virtual int32_t getFramesPerBurst()=0</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a9c8ea30e30e513766d5e996c370eb8d8"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a9c8ea30e30e513766d5e996c370eb8d8">oboe::AudioStream::close</a></div><div class="ttdeci">virtual Result close()</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a06e3f9e133b3a75515e7793939d1cd03"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a06e3f9e133b3a75515e7793939d1cd03">oboe::AudioStream::setBufferSizeInFrames</a></div><div class="ttdeci">virtual ResultWithValue&lt; int32_t &gt; setBufferSizeInFrames(int32_t)</div><div class="ttdef"><b>Definition:</b> AudioStream.h:177</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_ae023cb001f3261d064f423101798d6be"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#ae023cb001f3261d064f423101798d6be">oboe::AudioStream::calculateLatencyMillis</a></div><div class="ttdeci">virtual ResultWithValue&lt; double &gt; calculateLatencyMillis()</div><div class="ttdef"><b>Definition:</b> AudioStream.h:265</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_acb8edbc17ff79993a8ed996d216fe6f3"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#acb8edbc17ff79993a8ed996d216fe6f3">oboe::AudioStream::getTimestamp</a></div><div class="ttdeci">virtual Result getTimestamp(clockid_t, int64_t *, int64_t *)</div><div class="ttdef"><b>Definition:</b> AudioStream.h:286</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a686c6ce8a29051c858fd1de386805dc6"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a686c6ce8a29051c858fd1de386805dc6">oboe::AudioStream::open</a></div><div class="ttdeci">virtual Result open()</div><div class="ttdef"><b>Definition:</b> AudioStream.h:66</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_aeebfc59abd978cd6dff07c16cfe266df"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#aeebfc59abd978cd6dff07c16cfe266df">oboe::AudioStream::getFramesRead</a></div><div class="ttdeci">virtual int64_t getFramesRead()</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html"><div class="ttname"><a href="classoboe_1_1_audio_stream.html">oboe::AudioStream</a></div><div class="ttdef"><b>Definition:</b> AudioStream.h:44</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_add85011ba825f74931deeb92c5edf831"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#add85011ba825f74931deeb92c5edf831">oboe::AudioStream::isDataCallbackEnabled</a></div><div class="ttdeci">bool isDataCallbackEnabled()</div><div class="ttdef"><b>Definition:</b> AudioStream.h:470</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a8089f0a0cb68d4039cf33e6584129978"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a8089f0a0cb68d4039cf33e6584129978">oboe::AudioStream::read</a></div><div class="ttdeci">virtual ResultWithValue&lt; int32_t &gt; read(void *, int32_t, int64_t)</div><div class="ttdef"><b>Definition:</b> AudioStream.h:340</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a7f18bb3cc5490fd7fbc1f6da63c730f6"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a7f18bb3cc5490fd7fbc1f6da63c730f6">oboe::AudioStream::requestPause</a></div><div class="ttdeci">virtual Result requestPause()=0</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a3612c05ed6b01a213dde67d913c07e11"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a3612c05ed6b01a213dde67d913c07e11">oboe::AudioStream::write</a></div><div class="ttdeci">virtual ResultWithValue&lt; int32_t &gt; write(const void *, int32_t, int64_t)</div><div class="ttdef"><b>Definition:</b> AudioStream.h:322</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a07e82f9b9e2e4800f23ae9a7193c3b58"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a07e82f9b9e2e4800f23ae9a7193c3b58">oboe::AudioStream::mFramesRead</a></div><div class="ttdeci">std::atomic&lt; int64_t &gt; mFramesRead</div><div class="ttdef"><b>Definition:</b> AudioStream.h:496</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_base_html"><div class="ttname"><a href="classoboe_1_1_audio_stream_base.html">oboe::AudioStreamBase</a></div><div class="ttdef"><b>Definition:</b> AudioStreamBase.h:29</div></div>
<div class="ttc" id="namespaceoboe_html_a831e887150474c087170679eaca8672b"><div class="ttname"><a href="namespaceoboe.html#a831e887150474c087170679eaca8672b">oboe::kNanosPerMillisecond</a></div><div class="ttdeci">constexpr int64_t kNanosPerMillisecond</div><div class="ttdef"><b>Definition:</b> Definitions.h:43</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a820e634f741e6b5efdcef8104cecb919"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a820e634f741e6b5efdcef8104cecb919">oboe::AudioStream::requestStop</a></div><div class="ttdeci">virtual Result requestStop()=0</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a2b7a3cee7444114843dbdd1fc705f6bb"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a2b7a3cee7444114843dbdd1fc705f6bb">oboe::AudioStream::getAudioApi</a></div><div class="ttdeci">virtual AudioApi getAudioApi() const =0</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_aa5f4801cca6877eeaa4735b93933269d"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#aa5f4801cca6877eeaa4735b93933269d">oboe::AudioStream::launchStopThread</a></div><div class="ttdeci">void launchStopThread()</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a0c865a5501f369d959c39d8ab8b46a07"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a0c865a5501f369d959c39d8ab8b46a07">oboe::AudioStream::waitForStateChange</a></div><div class="ttdeci">virtual Result waitForStateChange(StreamState inputState, StreamState *nextState, int64_t timeoutNanoseconds)=0</div></div>
<div class="ttc" id="namespaceoboe_html_a486512e787b609c80ba4436f23929af1"><div class="ttname"><a href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">oboe::Result</a></div><div class="ttdeci">Result</div><div class="ttdef"><b>Definition:</b> Definitions.h:131</div></div>
<div class="ttc" id="structoboe_1_1_stream_deleter_functor_html"><div class="ttname"><a href="structoboe_1_1_stream_deleter_functor.html">oboe::StreamDeleterFunctor</a></div><div class="ttdef"><b>Definition:</b> AudioStream.h:513</div></div>
<div class="ttc" id="namespaceoboe_html"><div class="ttname"><a href="namespaceoboe.html">oboe</a></div><div class="ttdef"><b>Definition:</b> AudioStream.h:31</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_aa48da7bf28026b7cccee73e6b054af28"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#aa48da7bf28026b7cccee73e6b054af28">oboe::AudioStream::wasErrorCallbackCalled</a></div><div class="ttdeci">bool wasErrorCallbackCalled()</div><div class="ttdef"><b>Definition:</b> AudioStream.h:432</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a43d8a098440cde28f4ee8bedd6d107c4"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a43d8a098440cde28f4ee8bedd6d107c4">oboe::AudioStream::isXRunCountSupported</a></div><div class="ttdeci">virtual bool isXRunCountSupported() const =0</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_base_html_ae3f72318212dd9977d7fa0ced92c91f4"><div class="ttname"><a href="classoboe_1_1_audio_stream_base.html#ae3f72318212dd9977d7fa0ced92c91f4">oboe::AudioStreamBase::mStreamCallback</a></div><div class="ttdeci">AudioStreamCallback * mStreamCallback</div><div class="ttdef"><b>Definition:</b> AudioStreamBase.h:152</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a3c484e314dee8dfed1d419f487b5d601"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a3c484e314dee8dfed1d419f487b5d601">oboe::AudioStream::requestStart</a></div><div class="ttdeci">virtual Result requestStart()=0</div></div>
<div class="ttc" id="namespaceoboe_html_a89fa2ce046723764618c29db737917f6"><div class="ttname"><a href="namespaceoboe.html#a89fa2ce046723764618c29db737917f6">oboe::StreamState</a></div><div class="ttdeci">StreamState</div><div class="ttdef"><b>Definition:</b> Definitions.h:58</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a9d37cc6513823c685ae892626ff83ea8"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a9d37cc6513823c685ae892626ff83ea8">oboe::AudioStream::getState</a></div><div class="ttdeci">virtual StreamState getState() const =0</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a04f29836748a8e5842aef2be200022ad"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a04f29836748a8e5842aef2be200022ad">oboe::AudioStream::pause</a></div><div class="ttdeci">virtual Result pause(int64_t timeoutNanoseconds=kDefaultTimeoutNanos)</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a6bd5d633ff999e4da1faf3cd949aa602"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a6bd5d633ff999e4da1faf3cd949aa602">oboe::AudioStream::requestFlush</a></div><div class="ttdeci">virtual Result requestFlush()=0</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a462358ddab709c79d1a7968d6d55b727"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a462358ddab709c79d1a7968d6d55b727">oboe::AudioStream::updateFramesRead</a></div><div class="ttdeci">virtual void updateFramesRead()=0</div></div>
<div class="ttc" id="classoboe_1_1_audio_stream_html_a44dda61e6e948e49b68f87172f084d62"><div class="ttname"><a href="classoboe_1_1_audio_stream.html#a44dda61e6e948e49b68f87172f084d62">oboe::AudioStream::getBytesPerSample</a></div><div class="ttdeci">int32_t getBytesPerSample() const</div></div>
<div class="ttc" id="classoboe_1_1_result_with_value_html"><div class="ttname"><a href="classoboe_1_1_result_with_value.html">oboe::ResultWithValue</a></div><div class="ttdef"><b>Definition:</b> ResultWithValue.h:47</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
